#include <QtCore>
#include <QCoreApplication>

#include "../Common/GameInfo.h"
#include "../Common/DataNetworkRepresentation.h"


int main(int argc, char *argv[])
{
 QCoreApplication a(argc, argv);

 Player player1;
 player1.setCards('T', 's', '9', 'c');
 player1.setPosition(1);
 player1.setAmountRaised(80);
 player1.setStrategy("learning");
 player1.setAction(1);

 Player player2;
 player2.setCards('K', 's', 'K', 'c');
 player2.setPosition(2);
 player2.setStrategy("static");
 player2.setAction(1);

 GameInfo gameInfo;
 gameInfo.setGameState(1);
 gameInfo.setBigBlind(20);
 gameInfo.setPlayer(0, player1);
 gameInfo.setPlayer(1, player2);

 Card c1;
 c1.setCardName('9');
 c1.setCardColor('c');

 Card c2;
 c2.setCardName('2');
 c2.setCardColor('c');

 Card c3;
 c3.setCardName('3');
 c3.setCardColor('c');

 Card c4;
 c4.setCardName('5');
 c4.setCardColor('c');

 Card c5;
 c5.setCardName('7');
 c5.setCardColor('c');

 gameInfo.setBoardCards(c1, c2, c3, c4, c5);

 QString gameInfoXml = DataNetworkRepresentation::encoding(gameInfo);

 qDebug() << "Data encoding :";
 qDebug() << gameInfoXml;

 DataNetworkRepresentation::decoding(gameInfoXml, gameInfo);

 return a.exec();
}
